package com.ruoyi.process.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.process.mapper.WorkStromamixMapper;
import com.ruoyi.process.domain.WorkStromamix;
import com.ruoyi.process.service.IWorkStromamixService;

/**
 * 调配管理Service业务层处理
 *
 * @author ruoyi
 * @date 2021-07-12
 */
@Service
public class WorkStromamixServiceImpl implements IWorkStromamixService
{
    @Autowired
    private WorkStromamixMapper workStromamixMapper;

    @Override
    public List<WorkStromamix> selectWorkStromamixByuserId(Long userId)
    {
        return workStromamixMapper.selectWorkStromamixByuserId(userId);
    }
    /**
     * 查询调配管理
     *
     * @param workStromamixId 调配管理ID
     * @return 调配管理
     */
    @Override
    public WorkStromamix selectWorkStromamixById(Long workStromamixId)
    {
        return workStromamixMapper.selectWorkStromamixById(workStromamixId);
    }

    /**
     * 查询调配管理列表
     *
     * @param workStromamix 调配管理
     * @return 调配管理
     */
    @Override
    public List<WorkStromamix> selectWorkStromamixList(WorkStromamix workStromamix)
    {
        return workStromamixMapper.selectWorkStromamixList(workStromamix);
    }

    /**
     * 新增调配管理
     *
     * @param workStromamix 调配管理
     * @return 结果
     */
    @Override
    public int insertWorkStromamix(WorkStromamix workStromamix)
    {
        workStromamix.setCreateTime(DateUtils.getNowDate());
        return workStromamixMapper.insertWorkStromamix(workStromamix);
    }

    /**
     * 修改调配管理
     *
     * @param workStromamix 调配管理
     * @return 结果
     */
    @Override
    public int updateWorkStromamix(WorkStromamix workStromamix)
    {
        workStromamix.setUpdateTime(DateUtils.getNowDate());
        return workStromamixMapper.updateWorkStromamix(workStromamix);
    }

    /**
     * 批量删除调配管理
     *
     * @param workStromamixIds 需要删除的调配管理ID
     * @return 结果
     */
    @Override
    public int deleteWorkStromamixByIds(Long[] workStromamixIds)
    {
        return workStromamixMapper.deleteWorkStromamixByIds(workStromamixIds);
    }

    /**
     * 删除调配管理信息
     *
     * @param workStromamixId 调配管理ID
     * @return 结果
     */
    @Override
    public int deleteWorkStromamixById(Long workStromamixId)
    {
        return workStromamixMapper.deleteWorkStromamixById(workStromamixId);
    }
}
